<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <title>myInfo</title>
    <link rel="stylesheet" href="#(ctx_path)/lib/bootstrap/css/bootstrap.css">
    <style type="text/css">
        .container{
            background: #FAFAFA;
        }
        .row1{
            height:200px;background:#229EE6;line-height: 200px;text-align: center;
        }
        .row1 div{
            margin:40px 0 0 0;line-height:60px;
        }
        .row1 >div:nth-child(2){
            margin:50px 0 0 0;
            padding-left: 0px;
        }
        .row1>div:nth-child(2)>p{
            height: 20px;line-height: 20px;
            margin: 0;
            text-align: left;
        }
        .row1>div:nth-child(2)>p:nth-child(1){
            font-size: 16px;color:white;
            font-weight: bold;
        }

        .row1>div:nth-child(2)>p:nth-child(2){
            font-size: 13px;color:white;
        }
        #rowC{
            position:relative;height: 70px;width: 95%;margin: 0 auto;
        }

        #rowP{
            position:absolute;top:-40px;height: 100px;width: 100%;
            background:white;
            border:1px solid white;
            border-radius:8px;
            -moz-border-radius:8px;
            box-shadow: 0 0 4px #b6aeae;
        }
        #rowP p{
            margin: 0;
            padding: 0;
            width: 100%;
            text-align: center;
        }
        #rowP>p:first-child{
            height: 35px;
            line-height: 50px;
            font-size: 20px;
            font-weight: bold;
            color:orange;
        }
        #rowP>p:nth-child(2){
            font-size: 13px;
            height: 15px;
            color:grey;
            text-align: center;
        }
        #rowP .rowPc>p:first-child{
            font-size: 14px;
            font-weight: bold;
            color:orange;
        }
        #rowP .rowPc>p:nth-child(2){
            font-size: 13px;
            color:grey;
        }
        .row31 {
            height: 75px;
            width: 95%;
            margin:5px auto;
            background:white;
            border:1px solid white;
            border-radius:8px;
            -moz-border-radius:8px;
            box-shadow: 0 0 4px #b6aeae;

        }
        .row31>div:first-child {
            padding: 5px 0 0 5px;
        }
        .row31 div .glyphicon{
            color:#229EE6;
            padding-right: 5px;
        }
        .row31>div:nth-child(2){
            color:#ACACAC;
        }
        .row3{
            height: 60px;
        }
        .row4{
            height: 100px;
        }
        .row5{
            height: 75px;
        }
        .row5 >div:nth-child(2) span{
            font-size: 18px;
            padding-left: 10px;
            line-height: 40px;
            height: 40px;
        }
        #application{
            position: absolute;
            bottom:20px;
            height: 40px;width: 100%;
            line-height: 40px;
            text-align: center;
        }
        #application .glyphicon{
            font-size: 25px;
            top: 7px;
            color: orange;

        }
        .div_btn{
            display: inline-block;
            cursor: pointer;
            z-index: 1;
            width: 110px;
            text-align: center;
            line-height: 27px;
            height: 27px;
            color: white;
            font-weight: bold;
            background: #229EE6;
            border-radius: 15px;
            font-size: 15px;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="row row1">
        <div class="col-xs-4 col-md-4" >
            <img width="80" height="80" style="display: block;margin:0 auto;" src="#(ctx_path)/upload/#(cuItem.logo)" alt="">
        </div>
        <div class="col-xs-8 col-md-8">
            <p>#(cuItem.name)</p>
            <p>#(cuItem.description)</p>
        </div>
    </div>
    <div class="row row2">
        <div id="rowC">
            <div id="rowP">
                <p>￥#(cuItem.limit)</p>
                <p>额度</p>
                <div class="col-xs-6 col-md-6 rowPc" >
                    <p>#(cuItem.deadline)</p>
                    <p>分期期限</p>
                </div>
                <div class="col-xs-6 col-md-6 rowPc" >
                    <p>#(cuItem.rate)</p>
                    <p>参考利率</p>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="row3 row31">
            <div class="col-xs-12 col-md-12"><span class="glyphicon glyphicon-hand-right" ></span>放款时间</div>
            <div class="col-xs-12 col-md-12">最快#(cuItem.receivetime)放款</div>
        </div>
    </div>
    <div class="row">
        <div class="row4 row31">
            <div class="col-xs-12 col-md-12"><span class="glyphicon glyphicon-hand-right"></span>平台说明</div>
            <div class="col-xs-12 col-md-12">#(cuItem.note)</div>
        </div>
    </div>
    <div class="row">
        <div class="row5 row31">
            <div class="col-xs-12 col-md-12"><span class="glyphicon glyphicon-hand-right"></span>申请流程</div>
            <div class="col-xs-12 col-md-12">
                <span>注册</span><span>>></span>
                <span>申请</span><span>>></span>
                <span>审核</span><span>>></span>
                <span>放款</span>
            </div>
        </div>
    </div>
</div>
<div id="application">
    #if(isCollect == 1)
    <span onclick="collectUnCollect(this)" class="glyphicon glyphicon-star"></span>
    #else
    <span onclick="collectUnCollect(this)" class="glyphicon glyphicon-star-empty"></span>
    #end
    <!-- <span class="glyphicon glyphicon-star"></span>-->
    <a href="javascript:statisticsDetail('#(ctx_path)','#(cuItem.id)','#(cuItem.url)');" target="_blank" class="div_btn">立 即 申 请</a>
</div>
</body>
<script type="text/javascript" src="#(ctx_path)/lib/bootstrap/js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="#(ctx_path)/lib/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="#(ctx_path)/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="#(ctx_path)/lib/JSUtils/Tools.js"></script>
<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
<script>
    var customer = '#(session.customer ??)';
    var isCollect = 0;
    $(function(){
        console.log(customer);
        if (customer == ""){
            location.href = "#(ctx_path)/mobile/productList/showTelLogin";
        }else{
            isCollect = '#(isCollect ??)';
        }
    })

    function collectUnCollect(obj){
        if (isCollect == 0){
            collect(obj);
        }else {
            unCollect(obj);
        }
    }
    function collect(obj) {
        $.ajax({
            type: 'POST',
            url: '#(ctx_path)/mobile/productList/collectItem.html',
            data: {"itemId":"#(cuItem.id)"},
            dataType: 'json',
            async:false,
            success: function (data) {
                if (data.isSuccess == true){
                    isCollect = 1;
                    layer.msg('收藏成功！', {icon: 1,time:1500});
                    $(obj).removeClass("glyphicon-star-empty");
                    $(obj).addClass("glyphicon-star");
                }else{
                    layer.msg('收藏失败！', {icon: 7,time:1500});
                }
            },
            error:function(data) {
                layer.msg('系统错误，请联系管理员！', {icon: 5,time:1500});
                console.log(data.msg);
            }
        });
    }

    function unCollect(obj){
        $.ajax({
            type: 'POST',
            url: '#(ctx_path)/mobile/productList/unCollectItem.html',
            data: {"itemId":"#(cuItem.id)"},
            dataType: 'json',
            async:false,
            success: function (data) {
                if (data.isSuccess == true){
                    isCollect = 0;
                    layer.msg('取消收藏！', {icon: 1,time:1500});
                    $(obj).removeClass("glyphicon-star");
                    $(obj).addClass("glyphicon-star-empty");
                }else{
                    layer.msg('取消收藏失败！', {icon: 7,time:1500});
                }
            },
            error:function(data) {
                layer.msg('系统错误，请联系管理员！', {icon: 5,time:1500});
                console.log(data.msg);
            }
        });
    }
</script>
</html>
